<template>
  <div class="goods_item left">
    <a :href="goodsitem.link" class="goods_item_block">
      <img :src="goodsitem.show.img" alt />
      <div class="goods_info">
        <div class="goods_name">
          <span style="background: #FF743C;color: #FFFFFF">热卖</span>
          <span class="goods_title">{{goodsitem.title}}</span>
        </div>
        <div class="bot_box">
          <span class="goods_price left">{{goodsitem.orgPrice}}</span>
          <span class="goods_cfav right">❤{{goodsitem.cfav}}</span>
        </div>
      </div>
    </a>
  </div>
</template>

<script>
export default {
  props: {
    goodsitem: {
      type: Object,
      default() {
        return {};
      }
    }
  }
};
</script>

<style lang="less" scoped>
.goods_item {
  background-color: #fff;
  box-shadow: 1px 1px 1px #ccc;
  width: 47%;
  margin: 2% 0 0 2%;
  font-size: 13px;
  display: flex;
  img {
    width: 100%;
    height: 235px;
    border-radius: 5px;
  }
  .goods_name {
    height: 37px;
    line-height: 18px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin: 5px;
    .goods_title {
      margin-left: 3px;
    }
  }
  .bot_box {
    margin: 0 5px;
    height: 20px;
    line-height: 20px;
    .goods_price {
      max-width: 45%;
      font-size: 15px;
      font-weight: 700;
      color: var(--color-high-text);
      overflow: hidden;
    }
    .goods_cfav {
      font-size: 12px;
    }
  }
}
</style>